inherited dlgMoveSaldo: TdlgMoveSaldo
  Left = 850
  Top = 585
  VertScrollBar.Range = 0
  BorderStyle = bsDialog
  Caption = #1055#1077#1088#1077#1085#1086#1089' '#1089#1072#1083#1100#1076#1086
  ClientHeight = 382
  ClientWidth = 422
  OldCreateOrder = True
  OnShow = FormShow
  PixelsPerInch = 96
  TextHeight = 13
  inherited Panel1: TPanel
    Top = 355
    Width = 422
    inherited BitBtn1: TBitBtn
      Left = 215
    end
    inherited BitBtn2: TBitBtn
      Left = 317
    end
  end
  inherited ToolBar1: TToolBar
    Top = 81
    Width = 422
    Height = 0
    Enabled = False
    inherited ToolButton1: TToolButton
      Enabled = False
    end
    inherited ToolButton2: TToolButton
      Enabled = False
    end
    inherited ToolButton3: TToolButton
      Enabled = False
    end
    inherited ToolButton4: TToolButton
      Enabled = False
    end
  end
  object gbPanel: TPanel [2]
    Left = 0
    Top = 0
    Width = 422
    Height = 81
    Align = alTop
    BevelInner = bvRaised
    BevelOuter = bvLowered
    TabOrder = 2
    object rbMoveToManag: TRadioButton
      Left = 27
      Top = 12
      Width = 350
      Height = 17
      Caption = #1056#1072#1089#1087#1088#1077#1076#1077#1083#1080#1090#1100' '#1089#1072#1083#1100#1076#1086' '#1087#1086' '#1076#1086#1075#1086#1074#1086#1088#1072#1084' '#1074#1099#1073#1088#1072#1085#1085#1086#1081' '#1059#1050
      TabOrder = 0
      OnClick = rbMoveToManagClick
    end
    object rbMoveToSupplier: TRadioButton
      Tag = 1
      Left = 27
      Top = 32
      Width = 350
      Height = 17
      Caption = #1056#1072#1089#1087#1088#1077#1076#1077#1083#1080#1090#1100' '#1089#1072#1083#1100#1076#1086' '#1087#1086' '#1076#1086#1075#1086#1074#1086#1088#1072#1084' '#1074#1099#1073#1088#1072#1085#1085#1086#1075#1086' '#1087#1086#1089#1090#1072#1074#1097#1080#1082#1072
      TabOrder = 1
      OnClick = rbMoveToManagClick
    end
    object rbMoveToDogovor: TRadioButton
      Tag = 2
      Left = 27
      Top = 52
      Width = 350
      Height = 17
      Caption = #1055#1077#1088#1077#1085#1077#1089#1090#1080' '#1089#1072#1083#1100#1076#1086' '#1085#1072' '#1076#1088#1091#1075#1086#1081' '#1076#1086#1075#1086#1074#1086#1088' '#1072#1073#1086#1085#1077#1085#1090#1072
      TabOrder = 2
      OnClick = rbMoveToManagClick
    end
  end
  object PageControl: TPageControl [3]
    Left = 0
    Top = 81
    Width = 422
    Height = 274
    ActivePage = tsEmpty
    Align = alClient
    Style = tsFlatButtons
    TabOrder = 3
    OnChange = PageControlChange
    object tsManag: TTabSheet
      Caption = #1042#1099#1073#1077#1088#1080#1090#1077' '#1059#1050
      TabVisible = False
      OnShow = tsDogovorShow
      DesignSize = (
        414
        264)
      object Label1: TLabel
        Left = 4
        Top = 28
        Width = 93
        Height = 13
        Caption = #1057#1087#1080#1089#1086#1082' '#1076#1086#1075#1086#1074#1086#1088#1086#1074
      end
      object lcbManag: TDBLookupComboboxEh
        Left = 4
        Top = 4
        Width = 405
        Height = 19
        AlwaysShowBorder = True
        EditButtons = <>
        Flat = True
        KeyField = 'ID'
        ListField = 'MANAG'
        ListSource = dsc_Manag
        TabOrder = 0
        Visible = True
        OnChange = lcbManagChange
      end
      object dbgManagDogList: TDBGridEh
        Left = 4
        Top = 44
        Width = 405
        Height = 219
        Anchors = [akLeft, akTop, akBottom]
        DataSource = dsc_ManagDogList
        Flat = True
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -11
        Font.Name = 'MS Sans Serif'
        Font.Style = []
        FooterColor = clWindow
        FooterFont.Charset = DEFAULT_CHARSET
        FooterFont.Color = clWindowText
        FooterFont.Height = -11
        FooterFont.Name = 'MS Sans Serif'
        FooterFont.Style = [fsBold]
        OddRowColor = clInactiveCaptionText
        Options = [dgTitles, dgColumnResize, dgColLines, dgRowLines, dgRowSelect, dgConfirmDelete, dgCancelOnExit]
        OptionsEh = [dghFixed3D, dghHighlightFocus, dghClearSelection, dghAutoSortMarking, dghDblClickOptimizeColWidth, dghDialogFind]
        ParentFont = False
        ReadOnly = True
        TabOrder = 1
        TitleFont.Charset = DEFAULT_CHARSET
        TitleFont.Color = clWindowText
        TitleFont.Height = -11
        TitleFont.Name = 'MS Sans Serif'
        TitleFont.Style = [fsBold]
        UseMultiTitle = True
        VTitleMargin = 5
        Columns = <
          item
            EditButtons = <>
            FieldName = 'NAME'
            Footers = <>
            Width = 200
          end
          item
            EditButtons = <>
            FieldName = 'SUPPLIER'
            Footers = <>
            Width = 200
          end>
      end
    end
    object tsSupplier: TTabSheet
      Caption = #1042#1099#1073#1077#1088#1080#1090#1077' '#1087#1086#1089#1090#1072#1074#1097#1080#1082#1072
      ImageIndex = 1
      TabVisible = False
      OnShow = tsDogovorShow
      DesignSize = (
        414
        264)
      object Label2: TLabel
        Left = 4
        Top = 28
        Width = 93
        Height = 13
        Caption = #1057#1087#1080#1089#1086#1082' '#1076#1086#1075#1086#1074#1086#1088#1086#1074
      end
      object lcbSupplier: TDBLookupComboboxEh
        Left = 4
        Top = 4
        Width = 289
        Height = 19
        AlwaysShowBorder = True
        EditButtons = <>
        Flat = True
        KeyField = 'ID'
        ListField = 'NAME'
        ListSource = dsc_Supplier
        TabOrder = 0
        Visible = True
        OnChange = lcbSupplierChange
      end
      object dbgSuppDogList: TDBGridEh
        Left = 4
        Top = 44
        Width = 405
        Height = 219
        Anchors = [akLeft, akTop, akBottom]
        DataSource = dsc_SuppDogList
        Flat = True
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -11
        Font.Name = 'MS Sans Serif'
        Font.Style = []
        FooterColor = clWindow
        FooterFont.Charset = DEFAULT_CHARSET
        FooterFont.Color = clWindowText
        FooterFont.Height = -11
        FooterFont.Name = 'MS Sans Serif'
        FooterFont.Style = [fsBold]
        OddRowColor = clInactiveCaptionText
        Options = [dgTitles, dgColumnResize, dgColLines, dgRowLines, dgRowSelect, dgConfirmDelete, dgCancelOnExit]
        OptionsEh = [dghFixed3D, dghHighlightFocus, dghClearSelection, dghAutoSortMarking, dghDblClickOptimizeColWidth, dghDialogFind]
        ParentFont = False
        ReadOnly = True
        TabOrder = 1
        TitleFont.Charset = DEFAULT_CHARSET
        TitleFont.Color = clWindowText
        TitleFont.Height = -11
        TitleFont.Name = 'MS Sans Serif'
        TitleFont.Style = [fsBold]
        UseMultiTitle = True
        VTitleMargin = 5
        Columns = <
          item
            EditButtons = <>
            FieldName = 'NAME'
            Footers = <>
            Width = 199
          end
          item
            EditButtons = <>
            FieldName = 'MANAG'
            Footers = <>
            Width = 200
          end>
      end
    end
    object tsDogovor: TTabSheet
      Caption = #1042#1099#1073#1077#1088#1080#1090#1077' '#1076#1086#1075#1086#1074#1086#1088
      ImageIndex = 2
      TabVisible = False
      OnShow = tsDogovorShow
      object dbgActiveDogovors: TDBGridEh
        Left = 0
        Top = 0
        Width = 414
        Height = 264
        Align = alClient
        DataSource = dsc_ActiveDogList
        Flat = True
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -11
        Font.Name = 'MS Sans Serif'
        Font.Style = []
        FooterColor = clWindow
        FooterFont.Charset = DEFAULT_CHARSET
        FooterFont.Color = clWindowText
        FooterFont.Height = -11
        FooterFont.Name = 'MS Sans Serif'
        FooterFont.Style = [fsBold]
        OddRowColor = clInactiveCaptionText
        Options = [dgTitles, dgColumnResize, dgColLines, dgRowLines, dgRowSelect, dgConfirmDelete, dgCancelOnExit]
        OptionsEh = [dghFixed3D, dghHighlightFocus, dghClearSelection, dghAutoSortMarking, dghDblClickOptimizeColWidth, dghDialogFind]
        ParentFont = False
        ReadOnly = True
        TabOrder = 0
        TitleFont.Charset = DEFAULT_CHARSET
        TitleFont.Color = clWindowText
        TitleFont.Height = -11
        TitleFont.Name = 'MS Sans Serif'
        TitleFont.Style = [fsBold]
        UseMultiTitle = True
        VTitleMargin = 5
        Columns = <
          item
            EditButtons = <>
            FieldName = 'MANAG'
            Footers = <>
            Width = 138
          end
          item
            EditButtons = <>
            FieldName = 'NAME'
            Footers = <>
            Width = 138
          end
          item
            EditButtons = <>
            FieldName = 'SUPPLIER'
            Footers = <>
          end>
      end
    end
    object tsEmpty: TTabSheet
      ImageIndex = 3
      TabVisible = False
      DesignSize = (
        414
        264)
      object Label3: TLabel
        Left = 0
        Top = 72
        Width = 413
        Height = 74
        Alignment = taCenter
        Anchors = [akLeft, akTop, akRight]
        AutoSize = False
        Caption = #1053#1077' '#1074#1099#1073#1088#1072#1085' '#1084#1077#1090#1086#1076' '#1087#1077#1088#1077#1085#1086#1089#1072' '#1089#1072#1083#1100#1076#1086
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clWindowText
        Font.Height = -32
        Font.Name = 'MS Sans Serif'
        Font.Style = [fsBold]
        ParentFont = False
        WordWrap = True
      end
    end
  end
  inherited ActionList1: TActionList
    inherited aSave: TAction
      OnExecute = aSaveExecute
    end
    inherited aCancel: TAction
      OnExecute = aCancelExecute
    end
  end
  object ds_ManagDogList: TpFIBDataSet
    SelectSQL.Strings = (
      'select s.name, v.name as supplier'
      '  from vw_dogovors d'
      '  join v_supplier v on v.id = d.supplier_id'
      '  join services s on s.id = d.service_id'
      '  where d.manag_id = :pmanag_id'
      '    and d.abonent_id = :pabonent_id'
      '    and d.is_active = 1'
      'order by 1,2')
    Transaction = LocalTrans
    Database = MAINDM.pMainDatabase
    CSMonitorSupport.Enabled = csmeTransactionDriven
    Container = DSContainer
    Left = 108
    Top = 241
    object ds_ManagDogListNAME: TFIBStringField
      DisplayLabel = #1059#1089#1083#1091#1075#1072
      DisplayWidth = 30
      FieldName = 'NAME'
      Size = 120
      EmptyStrToNull = True
    end
    object ds_ManagDogListSUPPLIER: TFIBStringField
      DisplayLabel = #1055#1086#1089#1090#1072#1074#1097#1080#1082
      DisplayWidth = 30
      FieldName = 'SUPPLIER'
      Size = 60
      EmptyStrToNull = True
    end
  end
  object LocalTrans: TpFIBTransaction
    DefaultDatabase = MAINDM.pMainDatabase
    TimeoutAction = TARollback
    CSMonitorSupport.Enabled = csmeDatabaseDriven
    Left = 384
    Top = 5
  end
  object QSaldoMove: TpFIBQuery
    Transaction = LocalTrans
    Database = MAINDM.pMainDatabase
    SQL.Strings = (
      
        'execute procedure proc_dogovor_move_saldo (:pdogovor_src_id, :pd' +
        'ogovor_dst_id, :pmanag_id, :psupplier_id, current_date)')
    CSMonitorSupport.Enabled = csmeTransactionDriven
    Left = 384
    Top = 37
  end
  object dsc_ManagDogList: TDataSource
    DataSet = ds_ManagDogList
    Left = 140
    Top = 241
  end
  object ds_SuppDogList: TpFIBDataSet
    SelectSQL.Strings = (
      'select s.name, r.manag'
      '  from vw_dogovors d'
      '  join rmanag r on r.id = d.manag_id and r.closed_rs = 0'
      '  join services s on s.id = d.service_id'
      '  where d.supplier_id = :psupplier_id'
      '    and d.abonent_id = :pabonent_id'
      '    and d.is_active = 1'
      'order by 1,2')
    Transaction = LocalTrans
    Database = MAINDM.pMainDatabase
    CSMonitorSupport.Enabled = csmeTransactionDriven
    Container = DSContainer
    Left = 184
    Top = 241
    object ds_SuppDogListNAME: TFIBStringField
      DisplayLabel = #1059#1089#1083#1091#1075#1072
      DisplayWidth = 20
      FieldName = 'NAME'
      Size = 120
      EmptyStrToNull = True
    end
    object ds_SuppDogListMANAG: TFIBStringField
      DisplayLabel = #1059#1050
      DisplayWidth = 20
      FieldName = 'MANAG'
      Size = 60
      EmptyStrToNull = True
    end
  end
  object dsc_SuppDogList: TDataSource
    DataSet = ds_SuppDogList
    Left = 216
    Top = 241
  end
  object ds_Manag: TpFIBDataSet
    SelectSQL.Strings = (
      'select distinct r.id, r.manag'
      'from vw_dogovors d, rmanag r'
      'where d.abonent_id = :pabonent_id'
      '  and r.id = d.manag_id'
      '  and r.closed_rs = 0'
      '  and d.is_active = 1'
      'order by 2')
    Transaction = LocalTrans
    Database = MAINDM.pMainDatabase
    CSMonitorSupport.Enabled = csmeTransactionDriven
    Container = DSContainer
    Left = 112
    Top = 105
    object ds_ManagID: TFIBIntegerField
      FieldName = 'ID'
    end
    object ds_ManagMANAG: TFIBStringField
      FieldName = 'MANAG'
      Size = 60
      EmptyStrToNull = True
    end
  end
  object dsc_Manag: TDataSource
    DataSet = ds_Manag
    Left = 144
    Top = 105
  end
  object ds_Supplier: TpFIBDataSet
    SelectSQL.Strings = (
      'select distinct v.id, v.name'
      'from vw_dogovors d, v_supplier v, rmanag r'
      'where d.abonent_id = :pabonent_id'
      '  and v.id = d.supplier_id'
      '  and r.id = d.manag_id'
      '  and r.closed_rs = 0'
      '  and d.is_active = 1'
      'order by 2')
    Transaction = LocalTrans
    Database = MAINDM.pMainDatabase
    CSMonitorSupport.Enabled = csmeTransactionDriven
    Container = DSContainer
    Left = 184
    Top = 105
    object ds_SupplierID: TFIBIntegerField
      FieldName = 'ID'
    end
    object ds_SupplierNAME: TFIBStringField
      FieldName = 'NAME'
      Size = 60
      EmptyStrToNull = True
    end
  end
  object dsc_Supplier: TDataSource
    DataSet = ds_Supplier
    Left = 216
    Top = 105
  end
  object ds_ActiveDogList: TpFIBDataSet
    SelectSQL.Strings = (
      'select d.id, r.manag, s.name, v.name as supplier'
      '  from vw_dogovors d'
      '  join v_supplier v on v.id = d.supplier_id'
      '  join rmanag r on r.id = d.manag_id and r.closed_rs = 0'
      '  join services s on s.id = d.service_id'
      '  where d.abonent_id = :pabonent_id'
      '    and d.is_active = 1'
      '    and d.id <> :pdogovor_id'
      'order by 1,2, 3')
    Transaction = LocalTrans
    Database = MAINDM.pMainDatabase
    CSMonitorSupport.Enabled = csmeTransactionDriven
    Container = DSContainer
    Left = 264
    Top = 241
    object ds_ActiveDogListMANAG: TFIBStringField
      DisplayLabel = #1059#1050
      DisplayWidth = 20
      FieldName = 'MANAG'
      Size = 60
      EmptyStrToNull = True
    end
    object ds_ActiveDogListNAME: TFIBStringField
      DisplayLabel = #1059#1089#1083#1091#1075#1072
      DisplayWidth = 20
      FieldName = 'NAME'
      Size = 120
      EmptyStrToNull = True
    end
    object ds_ActiveDogListSUPPLIER: TFIBStringField
      DisplayLabel = #1055#1086#1089#1090#1072#1074#1097#1080#1082
      DisplayWidth = 20
      FieldName = 'SUPPLIER'
      Size = 60
      EmptyStrToNull = True
    end
    object ds_ActiveDogListID: TFIBIntegerField
      FieldName = 'ID'
    end
  end
  object dsc_ActiveDogList: TDataSource
    DataSet = ds_ActiveDogList
    Left = 296
    Top = 241
  end
  object DSContainer: TDataSetsContainer
    Left = 348
    Top = 4
  end
end
